package com.example.springsecurity.authorization;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.access.AccessDecisionVoter;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.core.Authentication;

import java.util.Collection;

/**
 * @Description 授权写成活的： 自定义AccessDecisionVoter
 * @Author benjamin
 * @Date 2020/3/17 16:55
 * @Version
 */
@Configuration
public class CustomAccessDecisionVoter implements AccessDecisionVoter {
    @Override
    public boolean supports(ConfigAttribute attribute) {
        return false;
    }

    @Override
    public int vote(Authentication authentication, Object object, Collection collection) {
        return 0;
    }

    @Override
    public boolean supports(Class clazz) {
        return false;
    }
}
